#!groovy
@Library('jenkinslib@master') _
def tools = new org.devops.toolscolor() 

pipeline {
    agent {
        kubernetes {
            label 'testzuwen'
        }
    }
    options {
    timestamps()
    //skipDefaultCheckout()
    timeout(time:1, unit: 'HOURS')
            }	
            
    stages{     
        stage('编译'){
            steps {
              script {
                tools.PrintMes('this is my library','green')
                     }  
            }
            }
         
    } //stages 

    post{
      always{
        script{
          println('always do this') 
        }
      }
      
      success{
        script{
          currentBuild.description ='\n 构建成功'
        }
      }      
 
      failure {
        script{
          currentBuild.description ='\n 构建失败'
        }
      }  

      aborted {
        script{
          currentBuild.description ='\n 构建取消'
        }
      }  
      
    } //post
    
}